﻿<BaseUI:UserControlBase
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:BaseUI="clr-namespace:Silverlight.Weblog.Client.Default.Widgets.BaseUI" x:Name="userControlBase"
	mc:Ignorable="d"
	xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.TwitterSidebarWidgetViewModelSampleData"
	x:Class="Silverlight.Weblog.Client.Default.Widgets.TwitterSidebarWidget"
	Width="200" Height="280">

	<BaseUI:UserControlBase.Resources>
		<SampleData:TwitterSidebarWidgetViewModelSampleData x:Key="TwitterSidebarWidgetViewModelSampleData" d:IsDataSource="True"/>
		<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
			<VirtualizingStackPanel/>
		</ItemsPanelTemplate>

		<DataTemplate x:Key="ModelItemTemplate">
			<Border Padding="0,0,0,5">
			<Border BorderThickness="1" BorderBrush="#FF707070" CornerRadius="5">
				<StackPanel Margin="2,2,0,2">
					<TextBlock Text="{Binding Status}" FontFamily="Arial" FontSize="12" TextWrapping="Wrap" Foreground="Black"/>
					<TextBlock TextWrapping="Wrap" Text="{Binding DisplayDate}" TextAlignment="Right" Margin="0,0,5,0" Foreground="#FF727272" FontFamily="Arial" FontSize="9.333"/>
				</StackPanel>
			</Border>
			</Border>
		</DataTemplate>
	</BaseUI:UserControlBase.Resources>
	<d:DataContext>
		<Binding Source="{StaticResource TwitterSidebarWidgetViewModelSampleData}"/>
	</d:DataContext>
	<Grid x:Name="LayoutRoot" d:DataContext="{Binding Source={StaticResource TwitterSidebarWidgetViewModelSampleData}}" Background="White">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="WindowStates">
				<VisualState x:Name="Expanded">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="userControlBase" Storyboard.TargetProperty="(FrameworkElement.Height)">
							<EasingDoubleKeyFrame KeyTime="00:00:01" Value="550">
								<EasingDoubleKeyFrame.EasingFunction>
									<CircleEase EasingMode="EaseInOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Collapsed">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="userControlBase" Storyboard.TargetProperty="(FrameworkElement.Height)">
							<EasingDoubleKeyFrame KeyTime="00:00:01" Value="280">
								<EasingDoubleKeyFrame.EasingFunction>
									<CircleEase EasingMode="EaseInOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid.RowDefinitions>
			<RowDefinition Height="19"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		<HyperlinkButton FontFamily="Trebuchet MS" FontSize="16" FontWeight="Bold" Content="{Binding FollowMeText}" d:LayoutOverrides="Height" NavigateUri="{Binding FollowMeLink}" TargetName="_blank"/>
		<ScrollViewer x:Name="scrollViewer" VerticalScrollBarVisibility="Auto" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" d:LayoutOverrides="Height" Grid.Row="1">
			<ScrollViewer.BorderBrush>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFA3AEB9" Offset="0"/>
					<GradientStop Color="#FF8399A9" Offset="0.375"/>
					<GradientStop Color="#FF718597" Offset="0.375"/>
					<GradientStop Color="#FF707070" Offset="1"/>
				</LinearGradientBrush>
			</ScrollViewer.BorderBrush>
			<ItemsControl ItemsPanel="{StaticResource ItemsPanelTemplate1}" ItemTemplate="{StaticResource ModelItemTemplate}" ItemsSource="{Binding Model}" VerticalAlignment="Top"/>
		</ScrollViewer>
	</Grid>
</BaseUI:UserControlBase>